# $Id: PKGBUILD 181125 2013-03-31 19:16:53Z stephane $
# Maintainer: Juergen Hoetzel <juergen@archlinux.org>

pkgname=licq
pkgver=1.7.1
pkgrel=3
pkgdesc="Advanced graphical ICQ clone and more for Unix" 
arch=('i686' 'x86_64')
url="http://www.licq.org"
license=('GPL')
depends=('boost-libs' 'gpgme' 'libxss' 'qt4')
makedepends=('cmake' 'boost')
options=('!libtool')
source=(http://downloads.sourceforge.net/sourceforge/licq/licq-${pkgver}.tar.bz2)
md5sums=('701e57efedc2b7ece64c3d2d2e9f9e16')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # licq
  mkdir build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr  ..
  make

  # qt4-gui
  cd ../plugins/qt4-gui
  mkdir build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_MODULE_PATH="${srcdir}/${pkgname}-${pkgver}/cmake"  ..
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}/build"
  make DESTDIR="${pkgdir}" install

  cd ../plugins/qt4-gui/build
  make DESTDIR="${pkgdir}" install
}
